﻿using UsedBookTradeSystem.Models.Base;
using UsedBookTradeSystem.Models.Enum;
using Zack.Commons;

namespace UsedBookTradeSystem.Models.Entity
{
    public class User : BaseEntity
    {
        public int Id { get; set; }
        public string? UserName { get; set; }

        public string? PasswordHash;

        public string? PassWord
        {
            get => PasswordHash;
            set => PasswordHash = HashHelper.ComputeMd5Hash(value);
        }
        public GenderEnum Gender { get; set; } = GenderEnum.Unknown;
        public RoleEnum Role { get; set; } = RoleEnum.User;
        public string? Tel { get; set; }
        public bool IsDeleted { get; set; } = false;
        public bool? IsDisabled { get; set; } = false;
        public List<Order>? orderList { get; set; }
        public Cart Cart { get; set; }
        public string? Address { get; set; }
    }
}
